package com.yjj.demo.aop.web;

import com.yjj.demo.aop.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.constraints.NotEmpty;

/**
 *
 *
 * @author yangjiajia
 * @time 2021/8/21 23:54
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @Autowired
    private TestService testService;

    @GetMapping("/add")
    public String add(@NotEmpty String code) {
        return testService.add(code);
    }

    @GetMapping("/get")
    public String get() {
        return testService.get();
    }

    @GetMapping("/get1")
    public void get1() {
        testService.get1();
    }
}
